<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="demo.css" />
</head>
<body>
<div id="app">
    <p><input type="text" v-model="message"></p>
    <p><button v-on:click="greet">Greet</button></p>
    <p><button v-on:click="say('hi')">Hi</button> </p>
</div>

</body>
<script src="../js/vue.1.0.24.js"></script>
<script>
    var vm = new Vue({
        el:'#app',
        data:{
            message:'Hello,Vue.js!'
        },
        methods: {
            greet: function() {
                alert(this.message);
            },
            say:function (msg) {
                alert(msg);
            }
        }
    });
</script>
</html>